package com.example.webmodule.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OpenApiConfig {
    public OpenAPI openAPI() {

        return new OpenAPI().info(
                new Info().title("Server API")
                        .version("1.0")
                        .description("Spring Boot 应用程序的 API 文档")
                        .termsOfService("http://example.com/terms") // 服务条款
                        .license(new License().name("Apache 2.0").url("http://springdoc.org")));
    }
}
